export default {
  // Global page headers: https://go.nuxtjs.dev/config-head
  watchQuery: true,
  head: {
    title: 'nuxt',
    htmlAttrs: {
      lang: 'en'
    },
    meta: [
      {charset: 'utf-8'},
      {name: 'viewport', content: 'width=device-width, initial-scale=1'},
      {hid: 'description', name: 'description', content: ''},
      {name: 'format-detection', content: 'telephone=no'},
      {name: "referrer", content: "never"}
    ],
    link: [
      {rel: 'icon', type: 'image/x-icon', href: '/favicon.ico'}
    ],
    script: [
      {
        src: '/js/iconfont.js'
      }
    ]
  },
  // Global CSS: https://go.nuxtjs.dev/config-css
  css: ['~/assets/css/main.css'],
  target: 'static',
  // Plugins to run before rendering page: https://go.nuxtjs.dev/config-plugins
  plugins: [
    '@/plugins/axios',
    '@/plugins/throttle',
    '@/plugins/scroller',
    {src: '@/plugins/persistedstate', ssr: false},
  ],
  axios: {
    baseURL: 'http://localhost:8000'
  },
  // proxy: {
  //   "/api": {
  //     // 配置接口地址
  //     target: "http://localhost:8000/",
  //     pathRewrite: {
  //       "^/api": "/"
  //     },
  //     changeOrigin: true
  //   }
  // },
  // Auto import components: https://go.nuxtjs.dev/config-components
  components: true,

  // Modules for dev and build (recommended): https://go.nuxtjs.dev/config-modules
  buildModules: [],
  // Modules: https://go.nuxtjs.dev/config-modules
  modules: [
    '@nuxtjs/axios',
    "@nuxtjs/proxy"
  ],

  // Build Configuration: https://go.nuxtjs.dev/config-build
  build: {}
}
